<form action="{'Product/insert'|U}" method="POST" name="Basic_addProductClass" onsubmit="return false">
{wz action="save,list,reset"}
<input type="hidden" name="file_tocken" value="{$file_tocken}">
<!--<input type="text" name="orders_norms" value="{C("STORAGE_FORMAT")}">-->
<div class="add_box">
 <table cellspacing="0" cellpadding="0" class="add_table">
    <tbody>
    <tr><th colspan="2">{$lang.basic_title}</th></tr>
    <tr>
      <td class="width15">{$lang.product_no}：</td>
      <td class="t_left"><input type="text"  name="product_no" value="{$max_no}" {$is_auto_no} >__*__
      </td>
    </tr>
    <tr>
      <td>{$lang.product_name}：</td>
      <td class="t_left"><input type="text" name="product_name" class="spc_input" >__*__
      </td>
    </tr>
    <tr>
      <td>{$lang.class_name}：</td>
      <td class="t_left">
      <input type="hidden" name="product_class_id" id="product_class_id" value="{$rs.product_class_id}"><input id="product_class_name" value="{$rs.class_name}" url="{'/AutoComplete/lastProductClass'|U}" jqac >__*__<span id="parent_info"></span>
      {quicklyAdd module="ProductClass"}
      </td>
    </tr>
    {if C('PRODUCT_FACTORY')==1}     
    <tr>
      <td>{$lang.factory_name}：</td>
      <td class="t_left">
      <input type="hidden" name="factory_id" id="factory_id" value="{$fac_id}">
      {if $rs.factory_readonly}
      {$rs.factory_name}
      {else}
      <input id="factory_name" name="temp[factory_name]" value="{$rs.factory_name}" url="{'/AutoComplete/factory'|U}" jqac>__*__
      {quicklyAdd module="Factory"}
      {/if}
      </td>
    </tr>    
    {/if}
    {if C('PRODUCT_COLOR')==1}
    <tr>
      <td>{$lang.color_name}：</td>
      <td class="t_left">
      {checkbox table="color" key="id" field="color_name" name="color[]" where="to_hide=1"} 
      <span id="add_color"></span> 
      {quicklyAdd module="Color"}
      </td>
    </tr> 
    {/if}
    {if C('PRODUCT_SIZE')==1}
    <tr>
      <td>{$lang.size_name}：</td>
      <td class="t_left">
      {checkbox table="size" key="id" field="size_name" name="size[]" where="to_hide=1"} 
      <span id="add_size"></span>
       {quicklyAdd module="Size"}
       </td> 
      </tr>
    {/if}
    {if $show_price_title}
    <tr><th colspan="2">{$lang.price_title}</th></tr>
    {/if}
     {if $show_field.instock_price}
    <tr>
      <td>{$lang.instock_price}：</td>
      <td class="t_left">
      <input type="text" name="instock_price" class="spc_input">（{$cur.in}）</td>
    </tr>
    {/if}
     {if C('MULTI_CLIENT')}
     {if $show_field.wholesale_price}
     <tr>
      <td>{$lang.wholesale_price}：</td>
      <td class="t_left">
      <input type="text" name="wholesale_price" class="spc_input">（{$cur.out}）</td>
    </tr>
     {/if}
      {if $show_field.retail_price}
    <tr>
      <td>{$lang.retail_price}：</td>
      <td class="t_left">
      <input type="text" name="retail_price" class="spc_input">（{$cur.out}）</td>
    </tr>
    {/if}
     {if $show_field.sale_price}
    <tr>
      <td>{$lang.other_price}：</td>
      <td class="t_left">
      <input type="text" name="sale_price" class="spc_input">（{$cur.out}）</td>
    </tr>
    {/if}
    {else}
    {if $show_field.sale_price}
     <tr>
      <td>{$lang.sale_price}：</td>
      <td class="t_left">
      <input type="text" name="sale_price" class="spc_input">（{$cur.out}）</td>
    </tr>
    {/if}
    {/if}
    <tr><th colspan="2">{$lang.propre_title}</th></tr>
{if C("storage_format")>1}
<tr>
<td>{$lang.storage_1}：</td>
<td class="t_left"><input name="capability" id="capability" type="text"  class="spc_input" onkeyup="sumBag()"/>__*__ 
</td>
</tr>
{/if}
{if C("storage_format")==3}
<tr>
<td>{$lang.dozen}：</td>
<td class="t_left"><input name="dozen" id="dozen" type="text" class="spc_input" onkeyup="sumBag()"/>__*__
</td>
</tr>
<tr>
<td>{$lang.storage_2}：</td>
<td class="t_left"><input type="text" name="p_s_3" id="p_s_3" value="" readonly class="readonly spc_input"></td>
</tr> 
{/if} 
<tr>
<td>{$lang.cube}：</td>
<td class="t_left">

{$lang.long}<input name="cube_long" id="cube_long" type="text" onkeyup="getToTtalCube(this);" class="spc_input" style="width:80px!important;"/>M *
{$lang.wide}<input name="cube_wide" id="cube_wide" type="text" onkeyup="getToTtalCube(this);" class="spc_input" style="width:80px!important;"/>M *
{$lang.high}<input name="cube_high" id="cube_high" type="text" onkeyup="getToTtalCube(this);" class="spc_input" style="width:80px!important;"/>M
=<input name="cube" id="cube" type="text" readonly  class="spc_input readonly" style="width:80px!important;"/>M3

</td>
</tr>
<tr>
<td>{$lang.weight}：</td>
<td class="t_left"><input name="weight" id="weight" type="text"  class="spc_input"/> KG
</td>
</tr>
{if C('PRODUCT_COLOR')==1 && C('PRODUCT_SIZE')==1}
<tr>
<td>{$lang.fit}：</td>
<td class="t_left">
<div class="product_width">{html_fit class="fit"}</div>
</td>
</tr>
{/if} 

<tr>
<td>{$lang.product_pics}：</td>
<td class="t_left">
{upload tocken=$file_tocken sid=$sid type=1}
</td>
</tr> 
{if $smarty.const.LANG_SET=='fr'}
{assign var="properties_name" value="properties_name_fr"}
{assign var="pv_name" value="pv_name_fr"}
{else}
{assign var="properties_name" value="properties_name"}
{assign var="pv_name" value="pv_name"}
{/if}
    {foreach key=key item=item from=$properties}
    <input type="hidden" name="product_detail[{$key}][properties_id]" value="{$item.id}">
    <tr>
      <td>{$item.$properties_name}：</td>
      <td class="t_left">
      {if $item.properties_type==1}
      <input type="text" name="product_detail[{$key}][value]" class="spc_input">
      {elseif $item.properties_type==2}
      {select combobox="1" name="product_detail[`$key`][value]" table="properties_value" key="id" field=$pv_name where="id in(select properties_value_id from properties_info where properties_id=`$item.id`) and to_hide=1" empty=true}
      {elseif $item.properties_type==3}
      {checkbox name="product_detail[`$key`][value][]" table="properties_value" key="id" field=$pv_name where="id in(select properties_value_id from properties_info where properties_id=`$item.id`) and to_hide=1"}
      {/if}
      </td>
    </tr>
    {/foreach}
     <tr>
      <td valign="top">{$lang.comments}：</td>
      <td class="t_left"><textarea name="comments"></textarea>
      </td>
    </tr>
    </tbody>
  </table> 
  </div>
    <br><br>
</form>
